package ynu.edu.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import ynu.edu.common.domain.PageDTO;
import ynu.edu.order.domain.dto.OrderFormDTO;
import ynu.edu.order.domain.po.Order;
import ynu.edu.order.domain.vo.OrderDetailVO;
import ynu.edu.order.domain.vo.OrderVO;

import java.util.List;

public interface IOrderService extends IService<Order> {

    /**
     * 创建订单
     */
    Long createOrder(OrderFormDTO orderFormDTO);

    /**
     * 标记订单已支付
     */
    void markOrderPaySuccess(Long orderId);

    /**
     * 取消订单
     */
    void cancelOrder(Long orderId);

    /**
     * 确认收货
     */
    void confirmOrder(Long orderId);

    /**
     * 申请退款
     */
    void applyRefund(Long orderId);

    /**
     * 查询订单详情
     */
    List<OrderDetailVO> queryOrderDetails(Long orderId);

    /**
     * 分页查询用户订单
     */
    PageDTO<OrderVO> queryUserOrders(Integer page, Integer size, Integer status);

    /**
     * 查询所有订单
     */
    PageDTO<OrderVO> queryAllOrders(Integer page, Integer size);
}
